package cs342.group1.messenger;

import java.sql.Date;

public class Message implements Comparable<Message>{
	public int Id;
	public int CloudId;
	public int FromUserId;
	public String FromUserName;
	public int ToUserId;
	public String ToUserName;
	public String Message;
	public Date DateSend;
	public Date DateReceived;
	public Boolean FromKeep;
	public Boolean ToKeep;
	
	public String toString()
	{
		return this.Message;
	}

	@Override
	public int compareTo(Message another) {
		if (this.CloudId < another.CloudId)
		{
			return -1;
		}
		else if (this.CloudId == another.CloudId)
		{
			return 0;
		}
		else
		{
			return 1;
		}
	}
}
